/* Base Styles */
:root {
    --bg-color: #121212;
    --panel-bg: #1e1e1e;
    --header-bg: #252525;
    --text-color: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: #333;
    --accent-color: #ff4757;
    --success-color: #2ed573;
    --warning-color: #ffa502;
    --info-color: #1e90ff;
  
    /* Message type colors */
    --danmaku-color: #00a8ff;
    --like-color: #ffa502;
    --entry-color: #2ed573;
    --follow-color: #ff6b81;
    --gift-color: #ff4757;
    --other-color: #7bed9f;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
      "Helvetica Neue", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
  }
  
  .app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 0;
    overflow: hidden;
  }
  
  /* Header Styles */
  .app-header {
    background-color: var(--header-bg);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
  }
  
  .app-title {
    display: flex;
    align-items: center;
  }
  
  .app-logo {
    width: 32px;
    height: 32px;
    margin-right: 10px;
  }
  
  .app-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
  }
  
  .connection-controls {
    display: flex;
    align-items: center;
    gap: 15px;
  }
  
  .connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 10px;
  }
  
  .status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
  }
  
  .status-indicator.online {
    background-color: var(--success-color);
    box-shadow: 0 0 5px var(--success-color);
  }
  
  .status-indicator.offline {
    background-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
  }
  
  /* Button Styles */
  .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
  }
  
  .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .btn-primary {
    background-color: var(--info-color);
    color: white;
  }
  
  .btn-primary:hover:not(:disabled) {
    background-color: #1a7ad9;
  }
  
  .btn-danger {
    background-color: var(--accent-color);
    color: white;
  }
  
  .btn-danger:hover:not(:disabled) {
    background-color: #e0404e;
  }
  
  .btn-secondary {
    background-color: #555;
    color: white;
  }
  
  .btn-secondary:hover:not(:disabled) {
    background-color: #444;
  }
  
  /* Stats Panel */
  .stats-panel {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
  }
  
  .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0 10px;
  }
  
  .stat-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
  }
  
  .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
  }
  
  .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
  }
  
  /* Messages Container */
  .messages-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 10px;
    gap: 10px;
  }
  
  .message-column {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    overflow: hidden;
  }
  
  .message-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    background-color: var(--panel-bg);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
  }
  
  .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
  }
  
  .panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
  }
  
  .message-count {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
  }
  
  .message-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
  }
  
  /* Message Items */
  .message-item {
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .message-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 3px;
  }
  
  .message-content {
    word-break: break-word;
  }
  
  .message-content strong {
    font-weight: 600;
  }
  
  /* Message type styling */
  .message-type-danmaku {
    border-left: 3px solid var(--danmaku-color);
  }
  
  .message-type-like {
    border-left: 3px solid var(--like-color);
  }
  
  .message-type-entry {
    border-left: 3px solid var(--entry-color);
  }
  
  .message-type-follow {
    border-left: 3px solid var(--follow-color);
  }
  
  .message-type-gift {
    border-left: 3px solid var(--gift-color);
  }
  
  .message-type-other {
    border-left: 3px solid var(--other-color);
  }
  
  /* Notification */
  .notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 350px;
    background-color: var(--panel-bg);
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
  }
  
  @keyframes slideIn {
    from {
      transform: translateX(100%);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  .notification.hidden {
    transform: translateX(100%);
    opacity: 0;
  }
  
  .notification-content {
    padding: 15px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
  }
  
  .notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 10px;
  }
  
  .notification.info {
    border-left: 4px solid var(--info-color);
  }
  
  .notification.success {
    border-left: 4px solid var(--success-color);
  }
  
  .notification.warning {
    border-left: 4px solid var(--warning-color);
  }
  
  .notification.gift {
    border-left: 4px solid var(--gift-color);
  }
  
  /* Scrollbar styling */
  ::-webkit-scrollbar {
    width: 8px;
  }
  
  ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
  }
  
  ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
  }
  
  /* Responsive adjustments */
  @media (max-width: 1200px) {
    .messages-container {
      flex-direction: column;
    }
  
    .message-column {
      width: 100%;
    }
  
    .stats-panel {
      flex-wrap: wrap;
    }
  
    .stat-item {
      flex: 0 0 33.333%;
      margin-bottom: 10px;
    }
  }
  
  @media (max-width: 768px) {
    .app-header {
      flex-direction: column;
      align-items: flex-start;
    }
  
    .connection-controls {
      margin-top: 10px;
      width: 100%;
      justify-content: space-between;
    }
  
    .stat-item {
      flex: 0 0 50%;
    }
  }
  